<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>dropdown menu</title>
  <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css"
    integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg=="
    crossorigin="anonymous"
    referrerpolicy="no-referrer"
  />
  <link rel="stylesheet" href="./style.css" type="text/css" />
  <body>
    <nav class="navigation">
      <div class="menuToggle"></div>
      <ul>
        <li>
          <a href="#">
            <span class="icon"><i class="fa-solid fa-house"></i></span>
            <span class="title">Home</span>
          </a>
        </li>
        <li>
          <a href="#">
            <span class="icon"><i class="fa-solid fa-user"></i></span>
            <span class="title">Profile</span>
          </a>
        </li>
        <li>
          <a href="#">
            <span class="icon"><i class="fa-solid fa-message"></i></span>
            <span class="title">Messages</span>
          </a>
        </li>
        <li>
          <a href="#">
            <span class="icon"><i class="fa-solid fa-gear"></i></span>
            <span class="title">Settings</span>
          </a>
        </li>
        <li>
          <a href="#">
            <span class="icon"><i class="fa-solid fa-lock"></i></span>
            <span class="title">Password</span>
          </a>
        </li>
        <li>
          <a href="#">
            <span class="icon"
              ><i class="fa-solid fa-right-from-bracket"></i
            ></span>
            <span class="title">Exit</span>
          </a>
        </li>
      </ul>
    </nav>
    <script>
      const navigation = document.querySelector(".navigation");
      const toggle = document.querySelector(".menuToggle");
      toggle.addEventListener("click", function () {
        this.classList.toggle("active");
        navigation.classList.toggle("active");
      });
    </script>
  </body>
</html>
